package com.ynhenc.pta.routeRank.impl;

import com.ynhenc.pta.routeRank.*;

public class ScenarioPta extends ComLib_PTA implements Scenario {

	public StartEndNodeList getStartEndNodeList_01_Shortest(RouteRequest routeRequest) {
		StartEndNodeList seNodeList = new StartEndNodeList();

		if (routeRequest.isTrafficGood()) {
			seNodeList.add(new StartEndNode(TransitType.AUTOMOBILE, Site.N001_DIGITAL_PAVILION, Site.N005_WESTIN_CHOSUN));
		} else { // 사고시 ....
			seNodeList.add(new StartEndNode(TransitType.AUTOMOBILE, Site.N002_SUSAIK_STATION, Site.N002_MAPOGUCHUNG_SUB_STATION));
			seNodeList.add(new StartEndNode(TransitType.AUTOMOBILE, Site.N002_MAPOGUCHUNG_SUB_STATION, Site.N005_WESTIN_CHOSUN));
		}

		return seNodeList;
	}

	public StartEndNodeList getStartEndNodeList_02_Green_01(RouteRequest routeRequest) {
		StartEndNodeList seNodeList = new StartEndNodeList();

		if (routeRequest.isTrafficGood()) {
			seNodeList.add(new StartEndNode(TransitType.BIKE, Site.N001_DIGITAL_PAVILION, Site.N002_SUSAIK_STATION));
			seNodeList.add(new StartEndNode(TransitType.SUBWAY, Site.N002_SUSAIK_STATION, Site.N004_ULJIROINGU_STATION));
			seNodeList.add(new StartEndNode(TransitType.WALK, Site.N004_ULJIROINGU_STATION, Site.N005_WESTIN_CHOSUN));
		} else { // 사고시 
			seNodeList.add(new StartEndNode(TransitType.SUBWAY, Site.N002_SUSAIK_STATION, Site.N004_ULJIROINGU_STATION)); 
			seNodeList.add(new StartEndNode(TransitType.WALK, Site.N004_ULJIROINGU_STATION, Site.N005_WESTIN_CHOSUN));
		} // 끝. 사고시 

		return seNodeList;
	}

	public StartEndNodeList getStartEndNodeList_03_Green_02(RouteRequest routeRequest) {
		StartEndNodeList seNodeList = new StartEndNodeList();

		if (routeRequest.isTrafficGood()) {
			seNodeList.add(new StartEndNode(TransitType.WALK, Site.N001_DIGITAL_PAVILION, Site.N002_WORLDCUP_PARK_3DANJI));
			seNodeList.add(new StartEndNode(TransitType.BUS, Site.N002_WORLDCUP_PARK_3DANJI, Site.N003_HAPJUNG_BUS_STOP));
			seNodeList.add(new StartEndNode(TransitType.SUBWAY, Site.N003_HAPJUNG_STATION, Site.N004_ULJIROINGU_STATION));
			seNodeList.add(new StartEndNode(TransitType.WALK, Site.N004_ULJIROINGU_STATION, Site.N005_WESTIN_CHOSUN));
		} else { // 사고시.
			seNodeList.add(new StartEndNode(TransitType.BUS, Site.N002_SUSAIK_STATION, Site.N004_ULJIROINGU_STATION)); 
			seNodeList.add(new StartEndNode(TransitType.WALK, Site.N004_ULJIROINGU_STATION, Site.N005_WESTIN_CHOSUN));
		} // 끝. 사고시.

		return seNodeList;
	}

	private ScenarioPta() {
	}

	public String getName() {
		return "SCENARIO_01_PTA";
	}

	public String toString() {
		return this.getName();
	}

	public static Scenario getScenario() {
		if (SCENARIO_SINGLE == null) {
			SCENARIO_SINGLE = new ScenarioPta();
		}
		return SCENARIO_SINGLE;
	}

	private static Scenario SCENARIO_SINGLE;

}
